<?php
require('php/controler/CtrlMain.php');
Main::runService('Log');
?>


<?php if(Main::lister()): ?>


	<?php foreach(FileSystem::listFiles('data/logs/') as $fichier){ ?>
		<?= Texte::toHtml($fichier) ?>
		<a href="journal_log.php?show=<?= $fichier ?>">Visionner</a>
		<a href="journal_log.php?download=<?= $fichier ?>"><?= Texte::toHtml('Télécharger') ?></a>
		<a href="journal_log.php?delete=<?= $fichier ?>">Supprimer</a><br/>
	<?php } ?>   
	
	

<?php else: ?>


	<a href="journal_log.php">Retour</a>
	<a href="journal_log.php?download=<?= Main::showLog() ?>"><?= Texte::toHtml('Télécharger') ?></a>
	<a href="journal_log.php?delete=<?= Main::showLog() ?>">Supprimer</a><br/>
	    
	<div class="scrollable">
	<?php foreach(FileSystem::readFile('data/logs/'.Main::showLog()) as $ligne){ ?>
	    <?= Texte::toHtml($ligne) ?><br/>
	<?php } ?>
	</div>
	
	
<?php endif; ?>
